import Vue from 'vue'
import App from './App.vue'
import router from './router'
import Element from 'element-ui'
// import 'element-ui/lib/theme-chalk/studentindex.css'
import VueCookies from 'vue-cookies'
import echarts from 'echarts'
import axios from 'axios'
import qs from 'qs'
import VueAMap from 'vue-amap';

Vue.use(VueAMap);

VueAMap.initAMapApiLoader({
  key: '4db2c4780d5d33a34ec919297d4c165e',

//插件

  plugin: ['AMap.Autocomplete', 'AMap.PlaceSearch', 'AMap.Scale', 'AMap.OverView', 'AMap.Marker','AMap.ToolBar', 'AMap.MapType', 'AMap.PolyEditor', 'AMap.CircleEditor','AMapUI.loadUI'],

// 默认高德 sdk 版本为 1.4.4
  v: '1.4.4',
  uiVersion: '1.0.11'

});
import '@/assets/Code_Farmer.css'
Vue.prototype.$qs = qs
axios.defaults.baseURL = "http://localhost:8080";
Vue.prototype.$axios = axios
Vue.prototype.$echarts = echarts
Vue.use(VueCookies)
Vue.use(Element)
Vue.config.productionTip = false
import components from './plugins/Component'//加载公共组件
Object.keys(components).forEach((key) => {
  var name = key.replace(/(\w)/, (v) => v.toUpperCase())
  Vue.component('v'+name, components[key])
})

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
